// import './assets/main.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import i18n from './locales'
import useDicts from '@mixins/DictsPlugin'
import pagination from '@components/Pagination/index.vue'

const app = createApp(App)

// 状态管理
const store = createPinia()
store.use(piniaPluginPersist)

// elements-plus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

//全局组件-分页
app.component('pagination', pagination);

// process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'

//国际化
app.use(i18n)
app.use(store)
app.use(router)
app.use(useDicts)
app.mount('#app')
